Skip to main content

All Questions

2votes
1answer
143views

Exception, errors handling, best practice in WebApi Core

I'm making my WebApi project. My logic is, the controller didn't see data. It only triggers a service that returns objects to it. My simple method from ...
metadon789's user avatar
2votes
1answer
1kviews

WebAPI global exception handler

There is a global exception handler in our WebAPI application that looks like the following: ...
TomSelleck's user avatar
6votes
3answers
21kviews

ASP.NET REST controller with try-catch error handling

Yesterday someone guided me through this article and I'm wondering whether I should use try-catch implementation or not? I have the following code below which is actually a RESTful service and I have ...
Sahil Sharma's user avatar
2votes
1answer
98views

IsDatabaseUp returns true or throws exception

I want to write an ASP.NET Web API endpoint that allows clients to check if database is running. The method below is check if database is up by establishing a connection and running a dummy sql ...
Pingpong's user avatar
0votes
1answer
5kviews

Error handling in a REST API

I have implemented a small REST API using WebApi 2 and NHibernate for ORM. When non-existent id is supplied, NHibernate will throw an InvalidOperationException. So ...
evictednoise's user avatar

close